﻿using System;
using System.Data;
using VitCode.Castle.DataAccess;
using VitCode.Web.UI;
using VitCode.Web.UI.WebControls;

namespace CRS.Web.BaseData
{
    public partial class GoodsList : System.Web.UI.Page
    {
        protected void btnQuery_Click(object sender, EventArgs e)
        {
            var strCondition = ObjQueryCondition.GetQueryCoditionString();
            if(GenericContext.CurrUser!=null && GenericContext.CurrUser.Contact!=null)
            {
                if (strCondition.Length > 0)
                    strCondition += " and ";
                else
                    strCondition += " where ";
                strCondition += "(商户名称='"+GenericContext.CurrUser.Contact.Name+"')";
            }
            ObjList.QueryCondition = strCondition;
            ObjList.BindData();
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Write("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>");
        }
        
    }
}
